﻿@model GeneralCommonSettingsModel

@{
    //page title
    ViewBag.Title = T("Admin.Configuration.Settings.GeneralCommon").Text;
    //active menu item (system name)
    Html.SetActiveMenuItemSystemName("General settings");
}

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    <div class="content-header clearfix">
        <h1 class="pull-left">
            @T("Admin.Configuration.Settings.GeneralCommon")
        </h1>
        <div class="pull-right">
            <button type="submit" name="save" class="btn bg-blue">
                <i class="fa fa-floppy-o"></i>
                @T("Admin.Common.Save")
            </button>
        </div>
    </div>

    <script>
        $(document).ready(function () {
            bindBootstrapTabSelectEvent('generalsettings-edit');
            $("#@Html.FieldIdFor(model => model.ProjectInformationSettings.SitemapEnabled)").click(toggleSitemapSettings);
            toggleSitemapSettings();
        });

        function toggleSitemapSettings() {
            if ($('#@Html.FieldIdFor(model => model.ProjectInformationSettings.SitemapEnabled)').is(':checked')) {
                $("#pnlSitemapIncludeCategories, #pnlSitemapIncludeManufacturers, #pnlSitemapIncludeProducts").show();
            }
            else {
                $("#pnlSitemapIncludeCategories, #pnlSitemapIncludeManufacturers, #pnlSitemapIncludeProducts").hide();
            }
        }
    </script>

    <div class="content">
        <div class="form-horizontal">
            @Html.Action("ProjectScopeConfiguration", "Setting")
            @Html.Action("Mode", "Setting")
            @Html.ValidationSummary(false)

            <div class="panel-group">
                <div class="panel panel-default">
                    <div class="panel-body">
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.ProjectInformationSettings.DefaultProjectTheme_OverrideForProject, "theme-selection-block", Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.ProjectInformationSettings.DefaultProjectTheme)
                            </div>
                            <div class="col-md-9">
                                <div id="theme-selection-block" class="theme-selection-block clearfix">
                                    @foreach (var theme in Model.ProjectInformationSettings.AvailableProjectThemes)
                                    {
                                        <div class="checkbox">
                                            <label>
                                                <span>
                                                    <input type="radio" name="@Html.FieldNameFor(x => x.ProjectInformationSettings.DefaultProjectTheme)" value="@theme.ThemeName"
                                                           @if (theme.ThemeName == Model.ProjectInformationSettings.DefaultProjectTheme) { <text> checked="checked" </text>  }>
                                                    @theme.ThemeTitle
                                                </span>
                                                <img src="@Url.Content(theme.PreviewImageUrl)" alt="@theme.PreviewText" title="@theme.PreviewText">
                                            </label>
                                        </div>
                                    }
                                </div>
                                @Html.ValidationMessageFor(model => model.ProjectInformationSettings.DefaultProjectTheme)
                                <em>@T("Admin.Configuration.Settings.GeneralCommon.DefaultProjectTheme.GetMore") <a href="http://www.SimpleDevelopFramework.com/extensions-and-themes.aspx?category=4&utm_source=admin-panel&utm_medium=theme-settings&utm_campaign=admin-panel" target="_blank">http://www.SimpleDevelopFramework.com/extensions-and-themes.aspx</a></em>
                            </div>
                        </div>
                        <div class="form-group" @(Model.ProjectInformationSettings.AvailableProjectThemes.Count == 1 ? Html.Raw("style=\"display:none\"") : null)>
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.ProjectInformationSettings.AllowCustomerToSelectTheme_OverrideForProject, model => model.ProjectInformationSettings.AllowCustomerToSelectTheme, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.ProjectInformationSettings.AllowCustomerToSelectTheme)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.ProjectInformationSettings.AllowCustomerToSelectTheme)
                                @Html.ValidationMessageFor(model => model.ProjectInformationSettings.AllowCustomerToSelectTheme)
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.ProjectInformationSettings.LogoPictureId_OverrideForProject, "logo-block", Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.ProjectInformationSettings.LogoPictureId)
                            </div>
                            <div class="col-md-9" id="logo-block">
                                @Html.SDFEditorFor(model => model.ProjectInformationSettings.LogoPictureId)
                                @Html.ValidationMessageFor(model => model.ProjectInformationSettings.LogoPictureId)
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.ProjectInformationSettings.DisplayEuCookieLawWarning_OverrideForProject, model => model.ProjectInformationSettings.DisplayEuCookieLawWarning, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.ProjectInformationSettings.DisplayEuCookieLawWarning)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.ProjectInformationSettings.DisplayEuCookieLawWarning)
                                @Html.ValidationMessageFor(model => model.ProjectInformationSettings.DisplayEuCookieLawWarning)
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.ProjectInformationSettings.FacebookLink_OverrideForProject, model => model.ProjectInformationSettings.FacebookLink, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.ProjectInformationSettings.FacebookLink)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.ProjectInformationSettings.FacebookLink)
                                @Html.ValidationMessageFor(model => model.ProjectInformationSettings.FacebookLink)
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.ProjectInformationSettings.TwitterLink_OverrideForProject, model => model.ProjectInformationSettings.TwitterLink, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.ProjectInformationSettings.TwitterLink)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.ProjectInformationSettings.TwitterLink)
                                @Html.ValidationMessageFor(model => model.ProjectInformationSettings.TwitterLink)
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.ProjectInformationSettings.YoutubeLink_OverrideForProject, model => model.ProjectInformationSettings.YoutubeLink, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.ProjectInformationSettings.YoutubeLink)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.ProjectInformationSettings.YoutubeLink)
                                @Html.ValidationMessageFor(model => model.ProjectInformationSettings.YoutubeLink)
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.ProjectInformationSettings.GooglePlusLink_OverrideForProject, model => model.ProjectInformationSettings.GooglePlusLink, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.ProjectInformationSettings.GooglePlusLink)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.ProjectInformationSettings.GooglePlusLink)
                                @Html.ValidationMessageFor(model => model.ProjectInformationSettings.GooglePlusLink)
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.ProjectInformationSettings.ProjectClosed_OverrideForProject, model => model.ProjectInformationSettings.ProjectClosed, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.ProjectInformationSettings.ProjectClosed)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.ProjectInformationSettings.ProjectClosed)
                                @Html.ValidationMessageFor(model => model.ProjectInformationSettings.ProjectClosed)
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.ProjectInformationSettings.SubjectFieldOnContactUsForm_OverrideForProject, model => model.ProjectInformationSettings.SubjectFieldOnContactUsForm, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.ProjectInformationSettings.SubjectFieldOnContactUsForm)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.ProjectInformationSettings.SubjectFieldOnContactUsForm)
                                @Html.ValidationMessageFor(model => model.ProjectInformationSettings.SubjectFieldOnContactUsForm)
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.ProjectInformationSettings.UseSystemEmailForContactUsForm_OverrideForProject, model => model.ProjectInformationSettings.UseSystemEmailForContactUsForm, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.ProjectInformationSettings.UseSystemEmailForContactUsForm)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.ProjectInformationSettings.UseSystemEmailForContactUsForm)
                                @Html.ValidationMessageFor(model => model.ProjectInformationSettings.UseSystemEmailForContactUsForm)
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.ProjectInformationSettings.SitemapEnabled_OverrideForProject, model => model.ProjectInformationSettings.SitemapEnabled, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.ProjectInformationSettings.SitemapEnabled)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.ProjectInformationSettings.SitemapEnabled)
                                @Html.ValidationMessageFor(model => model.ProjectInformationSettings.SitemapEnabled)
                            </div>
                        </div>
                        <div class="form-group advanced-setting" id="pnlSitemapIncludeCategories">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.ProjectInformationSettings.SitemapIncludeCategories_OverrideForProject, model => model.ProjectInformationSettings.SitemapIncludeCategories, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.ProjectInformationSettings.SitemapIncludeCategories)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.ProjectInformationSettings.SitemapIncludeCategories)
                                @Html.ValidationMessageFor(model => model.ProjectInformationSettings.SitemapIncludeCategories)
                            </div>
                        </div>
                        <div class="form-group advanced-setting" id="pnlSitemapIncludeManufacturers">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.ProjectInformationSettings.SitemapIncludeManufacturers_OverrideForProject, model => model.ProjectInformationSettings.SitemapIncludeManufacturers, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.ProjectInformationSettings.SitemapIncludeManufacturers)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.ProjectInformationSettings.SitemapIncludeManufacturers)
                                @Html.ValidationMessageFor(model => model.ProjectInformationSettings.SitemapIncludeManufacturers)
                            </div>
                        </div>
                        <div class="form-group advanced-setting" id="pnlSitemapIncludeProducts">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.ProjectInformationSettings.SitemapIncludeProducts_OverrideForProject, model => model.ProjectInformationSettings.SitemapIncludeProducts, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.ProjectInformationSettings.SitemapIncludeProducts)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.ProjectInformationSettings.SitemapIncludeProducts)
                                @Html.ValidationMessageFor(model => model.ProjectInformationSettings.SitemapIncludeProducts)
                            </div>
                        </div>
                    </div>
                </div>
                <div class="panel panel-default">
                    <div class="panel-body">
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.SeoSettings.DefaultTitle_OverrideForProject, model => model.SeoSettings.DefaultTitle, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.SeoSettings.DefaultTitle)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SeoSettings.DefaultTitle)
                                @Html.ValidationMessageFor(model => model.SeoSettings.DefaultTitle)
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.SeoSettings.PageTitleSeoAdjustment_OverrideForProject, model => model.SeoSettings.PageTitleSeoAdjustment, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.SeoSettings.PageTitleSeoAdjustment)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFDropDownListFor(model => model.SeoSettings.PageTitleSeoAdjustment, Model.SeoSettings.PageTitleSeoAdjustmentValues)
                                @Html.ValidationMessageFor(model => model.SeoSettings.PageTitleSeoAdjustment)
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.SeoSettings.PageTitleSeparator_OverrideForProject, model => model.SeoSettings.PageTitleSeparator, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.SeoSettings.PageTitleSeparator)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SeoSettings.PageTitleSeparator)
                                @Html.ValidationMessageFor(model => model.SeoSettings.PageTitleSeparator)
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.SeoSettings.DefaultMetaKeywords_OverrideForProject, model => model.SeoSettings.DefaultMetaKeywords, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.SeoSettings.DefaultMetaKeywords)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SeoSettings.DefaultMetaKeywords)
                                @Html.ValidationMessageFor(model => model.SeoSettings.DefaultMetaKeywords)
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.SeoSettings.DefaultMetaDescription_OverrideForProject, model => model.SeoSettings.DefaultMetaDescription, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.SeoSettings.DefaultMetaDescription)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SeoSettings.DefaultMetaDescription)
                                @Html.ValidationMessageFor(model => model.SeoSettings.DefaultMetaDescription)
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.SeoSettings.GenerateProductMetaDescription_OverrideForProject, model => model.SeoSettings.GenerateProductMetaDescription, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.SeoSettings.GenerateProductMetaDescription)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SeoSettings.GenerateProductMetaDescription)
                                @Html.ValidationMessageFor(model => model.SeoSettings.GenerateProductMetaDescription)
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.SeoSettings.EnableJsBundling_OverrideForProject, model => model.SeoSettings.EnableJsBundling, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.SeoSettings.EnableJsBundling)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SeoSettings.EnableJsBundling)
                                @Html.ValidationMessageFor(model => model.SeoSettings.EnableJsBundling)
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.SeoSettings.EnableCssBundling_OverrideForProject, model => model.SeoSettings.EnableCssBundling, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.SeoSettings.EnableCssBundling)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SeoSettings.EnableCssBundling)
                                @Html.ValidationMessageFor(model => model.SeoSettings.EnableCssBundling)
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.SeoSettings.WwwRequirement_OverrideForProject, model => model.SeoSettings.WwwRequirement, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.SeoSettings.WwwRequirement)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFDropDownListFor(model => model.SeoSettings.WwwRequirement, Model.SeoSettings.WwwRequirementValues)
                                @Html.ValidationMessageFor(model => model.SeoSettings.WwwRequirement)
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.SeoSettings.ConvertNonWesternChars_OverrideForProject, model => model.SeoSettings.ConvertNonWesternChars, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.SeoSettings.ConvertNonWesternChars)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SeoSettings.ConvertNonWesternChars)
                                @Html.ValidationMessageFor(model => model.SeoSettings.ConvertNonWesternChars)
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.SeoSettings.CanonicalUrlsEnabled_OverrideForProject, model => model.SeoSettings.CanonicalUrlsEnabled, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.SeoSettings.CanonicalUrlsEnabled)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SeoSettings.CanonicalUrlsEnabled)
                                @Html.ValidationMessageFor(model => model.SeoSettings.CanonicalUrlsEnabled)
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.SeoSettings.TwitterMetaTags_OverrideForProject, model => model.SeoSettings.TwitterMetaTags, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.SeoSettings.TwitterMetaTags)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SeoSettings.TwitterMetaTags)
                                @Html.ValidationMessageFor(model => model.SeoSettings.TwitterMetaTags)
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.SeoSettings.OpenGraphMetaTags_OverrideForProject, model => model.SeoSettings.OpenGraphMetaTags, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.SeoSettings.OpenGraphMetaTags)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SeoSettings.OpenGraphMetaTags)
                                @Html.ValidationMessageFor(model => model.SeoSettings.OpenGraphMetaTags)
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.SeoSettings.CustomHeadTags_OverrideForProject, model => model.SeoSettings.CustomHeadTags, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.SeoSettings.CustomHeadTags)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SeoSettings.CustomHeadTags)
                                @Html.ValidationMessageFor(model => model.SeoSettings.CustomHeadTags)
                            </div>
                        </div>
                    </div>
                </div>
                <div class="panel panel-default advanced-setting">
                    <div class="panel-body">
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.SecuritySettings.AdminAreaAllowedIpAddresses)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SecuritySettings.AdminAreaAllowedIpAddresses)
                                @Html.ValidationMessageFor(model => model.SecuritySettings.AdminAreaAllowedIpAddresses)
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.SecuritySettings.ForceSslForAllPages)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SecuritySettings.ForceSslForAllPages)
                                @Html.ValidationMessageFor(model => model.SecuritySettings.ForceSslForAllPages)
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.SecuritySettings.EnableXsrfProtectionForAdminArea)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SecuritySettings.EnableXsrfProtectionForAdminArea)
                                @Html.ValidationMessageFor(model => model.SecuritySettings.EnableXsrfProtectionForAdminArea)
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.SecuritySettings.EnableXsrfProtectionForPublicProject)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SecuritySettings.EnableXsrfProtectionForPublicProject)
                                @Html.ValidationMessageFor(model => model.SecuritySettings.EnableXsrfProtectionForPublicProject)
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.SecuritySettings.HoneypotEnabled)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SecuritySettings.HoneypotEnabled)
                                @Html.ValidationMessageFor(model => model.SecuritySettings.HoneypotEnabled)
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.SecuritySettings.EncryptionKey)
                            </div>
                            <div class="col-md-9">
                                <div class="input-group input-group-short">
                                    @Html.SDFEditorFor(model => model.SecuritySettings.EncryptionKey)
                                    <span class="input-group-btn">
                                        <button type="submit" name="changeencryptionkey" id="changeencryptionkey" class="btn btn-info">
                                            @T("Admin.Common.Change")
                                        </button>
                                        @Html.ActionConfirmation("changeencryptionkey")
                                    </span>
                                </div>
                                @Html.ValidationMessageFor(model => model.SecuritySettings.EncryptionKey)
                            </div>
                        </div>
                    </div>
                </div>
                <div class="panel panel-default advanced-setting">
                    <div class="panel-body">
                        <p>
                            A CAPTCHA is a program that can tell whether its user is a human or a computer.
                            You've probably seen them — colorful images with distorted text at the bottom of
                            Web registration forms. CAPTCHAs are used by many websites to prevent abuse from
                            "bots," or automated programs usually written to generate spam. No computer program
                            can read distorted text as well as humans can, so bots cannot navigate sites protected
                            by CAPTCHAs. SimpleDevelopFramework uses <a href="http://www.google.com/recaptcha" target="_blank">reCAPTCHA</a>.
                        </p>
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.SecuritySettings.CaptchaEnabled)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SecuritySettings.CaptchaEnabled)
                                @Html.ValidationMessageFor(model => model.SecuritySettings.CaptchaEnabled)
                            </div>
                        </div>
                        <div class="form-group" id="ssCaptchaShowOnLoginPagepnl">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.SecuritySettings.CaptchaShowOnLoginPage)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SecuritySettings.CaptchaShowOnLoginPage)
                                @Html.ValidationMessageFor(model => model.SecuritySettings.CaptchaShowOnLoginPage)
                            </div>
                        </div>
                        <div class="form-group" id="ssCaptchaShowOnRegistrationPagepnl">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.SecuritySettings.CaptchaShowOnRegistrationPage)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SecuritySettings.CaptchaShowOnRegistrationPage)
                                @Html.ValidationMessageFor(model => model.SecuritySettings.CaptchaShowOnRegistrationPage)
                            </div>
                        </div>
                        <div class="form-group" id="ssCaptchaShowOnContactUsPagepnl">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.SecuritySettings.CaptchaShowOnContactUsPage)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SecuritySettings.CaptchaShowOnContactUsPage)
                                @Html.ValidationMessageFor(model => model.SecuritySettings.CaptchaShowOnContactUsPage)
                            </div>
                        </div>
                        <div class="form-group" id="ssCaptchaShowOnEmailWishlistToFriendPagepnl">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.SecuritySettings.CaptchaShowOnEmailWishlistToFriendPage)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SecuritySettings.CaptchaShowOnEmailWishlistToFriendPage)
                                @Html.ValidationMessageFor(model => model.SecuritySettings.CaptchaShowOnEmailWishlistToFriendPage)
                            </div>
                        </div>
                        <div class="form-group" id="ssCaptchaShowOnEmailProductToFriendPagepnl">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.SecuritySettings.CaptchaShowOnEmailProductToFriendPage)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SecuritySettings.CaptchaShowOnEmailProductToFriendPage)
                                @Html.ValidationMessageFor(model => model.SecuritySettings.CaptchaShowOnEmailProductToFriendPage)
                            </div>
                        </div>
                        <div class="form-group" id="ssCaptchaShowOnBlogCommentPagepnl">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.SecuritySettings.CaptchaShowOnBlogCommentPage)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SecuritySettings.CaptchaShowOnBlogCommentPage)
                                @Html.ValidationMessageFor(model => model.SecuritySettings.CaptchaShowOnBlogCommentPage)
                            </div>
                        </div>
                        <div class="form-group" id="ssCaptchaShowOnNewsCommentPagepnl">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.SecuritySettings.CaptchaShowOnNewsCommentPage)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SecuritySettings.CaptchaShowOnNewsCommentPage)
                                @Html.ValidationMessageFor(model => model.SecuritySettings.CaptchaShowOnNewsCommentPage)
                            </div>
                        </div>
                        <div class="form-group" id="ssCaptchaShowOnProductReviewPagepnl">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.SecuritySettings.CaptchaShowOnProductReviewPage)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SecuritySettings.CaptchaShowOnProductReviewPage)
                                @Html.ValidationMessageFor(model => model.SecuritySettings.CaptchaShowOnProductReviewPage)
                            </div>
                        </div>
                        <div class="form-group" id="ssCaptchaShowOnApplyVendorPagepnl">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.SecuritySettings.CaptchaShowOnApplyVendorPage)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SecuritySettings.CaptchaShowOnApplyVendorPage)
                                @Html.ValidationMessageFor(model => model.SecuritySettings.CaptchaShowOnApplyVendorPage)
                            </div>
                        </div>
                        <div class="form-group" id="ssReCaptchaVersionpnl">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.SecuritySettings.ReCaptchaVersion)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFDropDownListFor(model => model.SecuritySettings.ReCaptchaVersion, Model.SecuritySettings.AvailableReCaptchaVersions)
                                @Html.ValidationMessageFor(model => model.SecuritySettings.ReCaptchaVersion)
                            </div>
                        </div>
                        <div class="form-group" id="ssReCaptchaPublicKeypnl">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.SecuritySettings.ReCaptchaPublicKey)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SecuritySettings.ReCaptchaPublicKey)
                                @Html.ValidationMessageFor(model => model.SecuritySettings.ReCaptchaPublicKey)
                            </div>
                        </div>
                        <div class="form-group" id="ssReCaptchaPrivateKeypnl">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.SecuritySettings.ReCaptchaPrivateKey)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.SecuritySettings.ReCaptchaPrivateKey)
                                @Html.ValidationMessageFor(model => model.SecuritySettings.ReCaptchaPrivateKey)
                            </div>
                        </div>
                    </div>
                    <script type="text/javascript">
                        $(document).ready(function() {
                            $("#@Html.FieldIdFor(model => model.SecuritySettings.CaptchaEnabled)").click(toggleReCaptcha);
                            toggleReCaptcha();
                        });

                        function toggleReCaptcha() {
                            if ($('#@Html.FieldIdFor(model => model.SecuritySettings.CaptchaEnabled)').is(':checked')) {
                                $('#ssCaptchaShowOnLoginPagepnl').show();
                                $('#ssCaptchaShowOnRegistrationPagepnl').show();
                                $('#ssCaptchaShowOnContactUsPagepnl').show();
                                $('#ssCaptchaShowOnEmailWishlistToFriendPagepnl').show();
                                $('#ssCaptchaShowOnEmailProductToFriendPagepnl').show();
                                $('#ssCaptchaShowOnBlogCommentPagepnl').show();
                                $('#ssCaptchaShowOnNewsCommentPagepnl').show();
                                $('#ssCaptchaShowOnProductReviewPagepnl').show();
                                $('#ssCaptchaShowOnApplyVendorPagepnl').show();
                                $('#ssReCaptchaPublicKeypnl').show();
                                $('#ssReCaptchaPrivateKeypnl').show();
                                $('#ssReCaptchaVersionpnl').show();
                            } else {
                                $('#ssCaptchaShowOnLoginPagepnl').hide();
                                $('#ssCaptchaShowOnRegistrationPagepnl').hide();
                                $('#ssCaptchaShowOnContactUsPagepnl').hide();
                                $('#ssCaptchaShowOnEmailWishlistToFriendPagepnl').hide();
                                $('#ssCaptchaShowOnEmailProductToFriendPagepnl').hide();
                                $('#ssCaptchaShowOnBlogCommentPagepnl').hide();
                                $('#ssCaptchaShowOnNewsCommentPagepnl').hide();
                                $('#ssCaptchaShowOnProductReviewPagepnl').hide();
                                $('#ssCaptchaShowOnApplyVendorPagepnl').hide();
                                $('#ssReCaptchaPublicKeypnl').hide();
                                $('#ssReCaptchaPrivateKeypnl').hide();
                                $('#ssReCaptchaVersionpnl').hide();
                            }
                        }
                    </script>
                </div>
                <div class="panel panel-default advanced-setting">
                    <div class="panel-body">
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.PdfSettings.LogoPictureId_OverrideForProject, "pdf-logo-picture", Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.PdfSettings.LogoPictureId)
                            </div>
                            <div class="col-md-9" id="pdf-logo-picture">
                                @Html.SDFEditorFor(model => model.PdfSettings.LogoPictureId)
                                @Html.ValidationMessageFor(model => model.PdfSettings.LogoPictureId)
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.PdfSettings.InvoiceFooterTextColumn1_OverrideForProject, model => model.PdfSettings.InvoiceFooterTextColumn1, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.PdfSettings.InvoiceFooterTextColumn1)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFTextAreaFor(model => model.PdfSettings.InvoiceFooterTextColumn1)
                                @Html.ValidationMessageFor(model => model.PdfSettings.InvoiceFooterTextColumn1)
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.PdfSettings.InvoiceFooterTextColumn2_OverrideForProject, model => model.PdfSettings.InvoiceFooterTextColumn2, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.PdfSettings.InvoiceFooterTextColumn2)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFTextAreaFor(model => model.PdfSettings.InvoiceFooterTextColumn2)
                                @Html.ValidationMessageFor(model => model.PdfSettings.InvoiceFooterTextColumn2)
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.PdfSettings.LetterPageSizeEnabled_OverrideForProject, model => model.PdfSettings.LetterPageSizeEnabled, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.PdfSettings.LetterPageSizeEnabled)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.PdfSettings.LetterPageSizeEnabled)
                                @Html.ValidationMessageFor(model => model.PdfSettings.LetterPageSizeEnabled)
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.OverrideProjectCheckboxFor(model => model.PdfSettings.DisablePdfInvoicesForPendingOrders_OverrideForProject, model => model.PdfSettings.DisablePdfInvoicesForPendingOrders, Model.ActiveProjectScopeConfiguration)
                                @Html.SDFLabelFor(model => model.PdfSettings.DisablePdfInvoicesForPendingOrders)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.PdfSettings.DisablePdfInvoicesForPendingOrders)
                                @Html.ValidationMessageFor(model => model.PdfSettings.DisablePdfInvoicesForPendingOrders)
                            </div>
                        </div>
                    </div>
                </div>
                <div class="panel panel-default advanced-setting">
                    <div class="panel-body">
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.LocalizationSettings.LoadAllLocaleRecordsOnStartup)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.LocalizationSettings.LoadAllLocaleRecordsOnStartup)
                                @Html.ValidationMessageFor(model => model.LocalizationSettings.LoadAllLocaleRecordsOnStartup)
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.LocalizationSettings.LoadAllLocalizedPropertiesOnStartup)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.LocalizationSettings.LoadAllLocalizedPropertiesOnStartup)
                                @Html.ValidationMessageFor(model => model.LocalizationSettings.LoadAllLocalizedPropertiesOnStartup)
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.LocalizationSettings.LoadAllUrlRecordsOnStartup)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.LocalizationSettings.LoadAllUrlRecordsOnStartup)
                                @Html.ValidationMessageFor(model => model.LocalizationSettings.LoadAllUrlRecordsOnStartup)
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.LocalizationSettings.UseImagesForLanguageSelection)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.LocalizationSettings.UseImagesForLanguageSelection)
                                @Html.ValidationMessageFor(model => model.LocalizationSettings.UseImagesForLanguageSelection)
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.LocalizationSettings.SeoFriendlyUrlsForLanguagesEnabled)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.LocalizationSettings.SeoFriendlyUrlsForLanguagesEnabled)
                                @Html.ValidationMessageFor(model => model.LocalizationSettings.SeoFriendlyUrlsForLanguagesEnabled)
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.LocalizationSettings.AutomaticallyDetectLanguage)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.LocalizationSettings.AutomaticallyDetectLanguage)
                                @Html.ValidationMessageFor(model => model.LocalizationSettings.AutomaticallyDetectLanguage)
                            </div>
                        </div>
                    </div>
                </div>
                <div class="panel panel-default advanced-setting">
                    <div class="panel-body">
                        <p>
                            @if (Model.FullTextSettings.Supported)
                            {
                                @T("Admin.Configuration.Settings.GeneralCommon.FullTextSettings.Supported")
                            }
                            else
                            {
                                @T("Admin.Configuration.Settings.GeneralCommon.FullTextSettings.NotSupported")
                            }
                        </p>
                        @if (Model.FullTextSettings.Supported)
                        {
                            <div class="form-group">
                                <div class="col-md-3">
                                    <div class="label-wrapper">
                                        <label class="control-label">
                                            @if (Model.FullTextSettings.Enabled)
                                            {
                                                @T("Admin.Configuration.Settings.GeneralCommon.FullTextSettings.CurrenlyEnabled")
                                            }
                                            else
                                            {
                                                @T("Admin.Configuration.Settings.GeneralCommon.FullTextSettings.CurrenlyDisabled")
                                            }
                                        </label>
                                    </div>
                                </div>
                                <div class="col-md-9">
                                    <button type="submit" name="togglefulltext" class="btn btn-primary">
                                        @(Model.FullTextSettings.Enabled ? T("Admin.Configuration.Settings.GeneralCommon.FullTextSettings.Disable").Text : T("Admin.Configuration.Settings.GeneralCommon.FullTextSettings.Enable").Text)
                                    </button>
                                </div>
                            </div>
                            if (Model.FullTextSettings.Enabled)
                            {
                                <div class="form-group">
                                    <div class="col-md-9 col-md-offset-3">
                                        @T("Admin.Configuration.Settings.GeneralCommon.FullTextSettings.NoiseWords")
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-md-3">
                                        @Html.SDFLabelFor(model => model.FullTextSettings.SearchMode)
                                    </div>
                                    <div class="col-md-9">
                                        @Html.SDFDropDownListFor(model => model.FullTextSettings.SearchMode, Model.FullTextSettings.SearchModeValues)
                                        @Html.ValidationMessageFor(model => model.FullTextSettings.SearchMode)
                                    </div>
                                </div>
                            }
                        }
                    </div>
                </div>
            </div>
        </div>
    </div>
}